#426 gateway - Add UI customization part#468
#426 gateway - Add UI customization part#468Gaetanbrl wants to merge 2 commits intogeorchestra:masterfrom
Conversation
a47f030 to
15c33d1
Compare
Complete comment about static changes use georchestra-primay css
509f2fa to
7fbb228
Compare
f-necas
left a comment
There was a problem hiding this comment.
I don't think we need to import /static/ from the upstream repo. We can let them inside and provide a good documentation of how to use spring.web.resources.static-locations.
We can point to upstream repo in order to show what's already in the classpath.
I may also rename html files in login.html.example to avoid confusion about where are files fetched.
| # prefix: file:${georchestra.datadir}/gateway/templates/ | ||
| # web: | ||
| # resources: | ||
| # static-locations: file:${georchestra.datadir}/gateway/templates/static/ |
There was a problem hiding this comment.
As the comment I wrote in : georchestra/georchestra-gateway#235 (review)
You can set up static-locations: file:/etc/georchestra/gateway/static/, classpath:/static/. With this line, resources willl be fetched from datadir first and then fallback into classpath:/static/
There was a problem hiding this comment.
| # static-locations: file:${georchestra.datadir}/gateway/templates/static/ | |
| # In order to import your resources, create a folder /etc/georchestra/gateway/static/ and put them inside. e.g. If you create /etc/georchestra/gateway/static/img/myimg.png, your resource will be available on <your domain>/img/myimg.png | |
| # static-locations: file:/etc/georchestra/gateway/static/, classpath:/static/ |
| # resources: | ||
| # static-locations: file:${georchestra.datadir}/gateway/templates/static/ | ||
| # webflux: | ||
| # static-path-pattern: /static/** |
There was a problem hiding this comment.
Not mandatory by default it's /.
It just change the path in url with prefixing it, but folder hierarchy may resolve this. By now, resources are fetched only from classpath:/static/ and the folder hirearchy inside is everything under /login.
So by default, we can resolve static resources with the url /login/error.css or /login/img/default.png
If you set # static-path-pattern: /static/**, urls will be /static/login/error.css or /static/login/img/default.png.
There was a problem hiding this comment.
| # static-path-pattern: /static/** | |
| # Change this line if you want to set a "base path" to your static resources | |
| # static-path-pattern: /static/** # <- your resource will be available with a /static/ prefix |
This PR :
See the documentation for details:
https://docs.georchestra.org/gateway/en/latest/user_guide/ui_customization/?h=thy#main-principles
The files originate from:
https://github.com/georchestra/georchestra-gateway/tree/main/gateway/src/main/resources